// vite.config.js
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import requireTransform from 'vite-plugin-require-transform';
import path from "path";
const resolve = (dir) => path.resolve(__dirname, dir);
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), requireTransform({
    fileRegex: /.js$|.vue$/
  }),],

  optimizeDeps: {
    entries: ["**/*.html", "reactivity/*.html",]
  },
  css: {
    // 预处理器配置项
    preprocessorOptions: {
      less: {
        math: "always",
      },
    },
  },
  resolve: {
    alias: {
      '@': resolve('src'),//作为 entries 的选项
    },
    extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
  }

});